import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import tx.config.SpringConfig;
import tx.controller.BookController;

public class TestAnno {
    @Test
    public void testTxAllAnnotation() {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        BookController accountService = context.getBean(BookController.class);
        Integer[] bookIds = {1,2};
        accountService.checkout(bookIds,1);
    }
}
